package modules.simplemodule.controller
{
	import flash.utils.getQualifiedClassName;
	
	import modules.simplemodule.SimpleModule;
	import modules.simplemodule.model.SimpleModuleProxy;
	import modules.simplemodule.view.SimpleModuleMediator;
	
	import org.osflash.thunderbolt.Logger;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;

	public class SimpleModuleStartupCommand extends SimpleFabricationCommand
	{
		public static const NAME:String = getQualifiedClassName(SimpleModuleStartupCommand);
		
		override public function execute(notification:INotification):void
		{
			Logger.info(NAME+ " : execute()");
			var app:SimpleModule = notification.getBody() as SimpleModule;

			// register Proxy
			registerProxy(new SimpleModuleProxy());
			
			//register Mediator
			registerMediator(new SimpleModuleMediator(app));
			
			//var simpleModuleProxy:SimpleModuleProxy = retrieveProxy(SimpleModuleProxy.NAME) as SimpleModuleProxy;
			
			//simpleModuleProxy.load();
			
		}
	}
}